Repository navigation
Adapt to upstream vm crd refactoring - #1544
Open
PhilippMatthes wants to merge 2 commits into
Open
PhilippMatthes wants to merge 2 commits into
PhilippMatthes wants to merge 2 commits into
Conversation
Bump vm-operator and adapt to the refactored VirtualMachine CRD: the Scheduled condition and Spec.TargetHost/LabelTargetHost are gone, the status conditions were redesigned, and a cortex subspec now carries the scheduling result (host candidates, intent, observed generation, last transition time). - vm_handler: write only the cortex subspec/labels, preserve the out-of-band Ownership.Domain, stamp ObservedGeneration/LastTransitionTime correctly, and stop writing operator-owned conditions. - inflight vm owner handler: release in-flight reservations on a fresh settled (status=False) Migrating/Resizing condition instead of removed terminal reasons; cover evacuation via the Migrating condition. - failover partition graph KPI: skip deleted / to-be-deleted VMs when counting VMs per host. - update tests, CRD pin in Tiltfile, RBAC, and docs. Signed-off-by: Philipp Matthes <p.matthes@sap.com>
PhilippMatthes
force-pushed
the
update-to-refactored-vm-crd
branch
from
November 17, 2026 12:14
d60d404 to
015815d
Compare
Bump vm-operator to pick up the renamed CortexSpec fields (all now prefixed with "scheduling"/"scheduled") and the new SchedulingError: - HostCandidates -> SchedulingCandidates - Explanation -> SchedulingExplanation - Intent -> SchedulingIntent - LastTransitionTime -> SchedulingTime - ObservedGeneration -> ScheduledGeneration - new SchedulingError (empty on success; cleared on a successful update) Update the vm_handler, its tests, the CRD pin in the Tiltfile, and the docs to match. Signed-off-by: Philipp Matthes <p.matthes@sap.com>
Contributor
Test Coverage ReportTest Coverage 📊: 72.2% |
PhilippMatthes
marked this pull request as ready for review
November 17, 2026 13:29
PhilippMatthes
requested review from
SoWieMarkus,
auhlig,
juliusclausnitzer,
mblos and
umswmayj
as code owners
November 17, 2026 13:29
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change bumps the vm-operator dependency and adapts Cortex to the refactored VirtualMachine CRD. Upstream removed the Scheduled condition along with the Spec.TargetHost field and target-host label, redesigned the status conditions, and introduced a cortex subspec that now carries the scheduling result. Cortex consequently writes only that subspec plus the immutable spec and labels on create, derives the target host from the scheduling result rather than a CRD field, preserves the out-of-band Ownership.Domain across Nova syncs, and stamps ObservedGeneration and LastTransitionTime according to the upstream semantics. It also stops writing conditions entirely, since those are now owned exclusively by the vm-operator.
The in-flight reservation handler was reworked to release holds on a fresh settled Migrating or Resizing condition (status False transitioned at or after the reservation was created) instead of the removed terminal reason constants, with evacuation now handled through the Migrating condition and the stale-observation guard preserved so an idle VM never releases new holds. The failover partition graph KPI now skips VMs that are confirmed deleted or scheduled for deletion when counting VMs per host, since the operator retains last-known Nova fields for gone servers. The remainder of the change updates the affected tests, the CRD pin in the Tiltfile, the RBAC rules, and the documentation to match.